<?php echo $this->Html->script('JqueryLists'); ?>
<div class="mailLists index">
	<h2><?php echo __('Lists'); ?></h2>
	<table cellpadding="0" cellspacing="0" id="lists" class="search">
	<thead>
	<tr>
			<!--<th><?php echo $this->Paginator->sort('id'); ?></th>-->
			<th><?php echo $this->Paginator->sort('name'); ?></th>
			<th><?php echo $this->Paginator->sort('description'); ?></th>
			<th><?php echo $this->Paginator->sort('team'); ?></th>
			<th></th>
	</tr>
	</thead>
	<tbody>
	<?php
                    if (!empty($mailLists)){
                        foreach ($mailLists as $mailList):
                    ?>
    	<tr>
		<!--<td><?php echo h($mailList['MailList']['id']); ?>&nbsp;</td>-->
		<td><?php echo h($mailList['MailList']['name']); ?>&nbsp;</td>
		<td><?php echo h($mailList['MailList']['mail_desc']); ?>&nbsp;</td>
		<td >
			<?php echo $this->Html->link($mailList['Team']['name'], array('controller' => 'teams', 'action' => 'view', $mailList['Team']['id'])); ?>
		</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $mailList['MailList']['id'])); ?>
			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $mailList['MailList']['id'])); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $mailList['MailList']['id']), null, __('Are you sure you want to delete '.$mailList['MailList']['name'].' ?')); ?>
		</td>
	</tr>
    <?php
                                endforeach;
                            }else{
                            ?>
                            <tr>
                                <td>No Data Found</td>
                            </tr>
                            <?php }?>
	</tbody>
	</table>
	        <p>

                    	<div class="addbuttons" >
						<ul>
							<li><?php echo $this->Html->link(__('New List'), array('controller' => 'mailLists', 'action' => 'add')); ?> </li>
						</ul>
						</div>
            <p>

    	    <p>

</div>
